﻿<%@ Page Language="C#" MasterPageFile="~/Admin/admin.master" AutoEventWireup="true"
    CodeFile="ReturnGood.aspx.cs" Inherits="Admin_ReturnGood" Title="" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <br />
    <br />
    <br />
    <data:GridViewSearchPanel ID="GridViewSearchPanel1" runat="server" GridViewControlID="GridView1"
        PersistenceMethod="Session" />
    <br />
    <data:EntityGridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="StockOutDataSource"
        DataKeyNames="StockOutId" AllowMultiColumnSorting="false" DefaultSortColumnName="" AllowPaging="True"
        DefaultSortDirection="Ascending" ExcelExportFileName="Export_ExportAdjust.xls"
        OnSelectedIndexChanged="GridView1_SelectedIndexChanged" 
        onrowcommand="GridView1_RowCommand">
        <Columns>
            <asp:CommandField ShowSelectButton="True" />
            <asp:BoundField DataField="StockOutId" HeaderText="Stock Out Id" SortExpression="[StockOutId]"
                ReadOnly="True" />
            <%--<asp:BoundField DataField="PrepareBy" HeaderText="Prepare By" SortExpression="[PrepareBy]" />--%>
            <asp:BoundField DataField="StockOutDate" DataFormatString="{0:dd-MMM-yyyy}" HtmlEncode="False"
                HeaderText="Stock Out Date" SortExpression="[StockOutDate]" />
            <asp:BoundField DataField="TotalAmount" HeaderText="Total Amount" SortExpression="[TotalAmount]" />
            <asp:BoundField DataField="Remark" HeaderText="Remark" SortExpression="[Remark]" />
            <data:BoundRadioButtonField DataField="IsComplete" HeaderText="Is Complete" SortExpression="[IsComplete]" />
            <asp:TemplateField>
                <ItemTemplate>
                    <asp:ImageButton ID="btn_Delete" runat="server" CommandName="CustomDelete" CommandArgument='<%#Eval("StockOutId") %>'
                        Enabled='<%#!(Boolean)Eval("IsComplete")%>' ImageUrl="~/Admin/resources/images/icons/cross_circle.png"
                        OnClientClick="return confirm('Are you sure want to delete?');" />
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <EmptyDataTemplate>
            <b>No Export Adjust Found!</b>
        </EmptyDataTemplate>
    </data:EntityGridView>
    <br />
    <asp:Button runat="server" ID="btnStockOut" OnClientClick="javascript:location.href='ReturnGoodEdit.aspx'; return false;"
        Text="Add New" CssClass="button"></asp:Button>
    <data:StockOutDataSource ID="StockOutDataSource" runat="server" SelectMethod="GetPaged"
        EnablePaging="True" EnableSorting="True" EnableDeepLoad="True" OnSelecting="StockOutDataSource_Selecting">
        <DeepLoadProperties Method="IncludeChildren" Recursive="False">
            <Types>
                <data:StockOutProperty Name="WebUser" />
            </Types>
        </DeepLoadProperties>
        <Parameters>
            <data:CustomParameter Name="WhereClause" Value="" ConvertEmptyStringToNull="false" />
            <data:CustomParameter Name="OrderByClause" Value="" ConvertEmptyStringToNull="false" />
            <asp:ControlParameter Name="PageIndex" ControlID="GridView1" PropertyName="PageIndex"
                Type="Int32" />
            <asp:ControlParameter Name="PageSize" ControlID="GridView1" PropertyName="PageSize"
                Type="Int32" />
            <data:CustomParameter Name="RecordCount" Value="0" Type="Int32" />
        </Parameters>
    </data:StockOutDataSource>
</asp:Content>
